package biolabs.core;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Designates a method as an approver for child operations (addition,
 * removal, replacement). Used in children-aware model's traits.
 * The marked method must be of type `(List[C], List[C]) => Boolean`
 * or `(List[(C,A)], List[(C,A)]) => Boolean`, where `C` is the type
 * of children and `A` is the type of value associated with each child.
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ChildOpApprover {
	/**
	 * A list of named child selectors for whose children the method
	 * marked by this annotation is an approver. The child selector
	 * names must refer to @Named constructor/init method parameters.
	 */
	String[] value();
}
